<template>
	<view :style="themeColor">
		<view class="page">
			<view class="flex align-stretch benben-position-layout flex balanceDetail_flex_0"
				:style="{height:(88+StatusBarRpx)+'rpx',paddingTop:StatusBarRpx+'rpx', }">
				<view class='flex align-center justify-between flex-sub balanceDetail_fd0_0'>
					<view class='flex align-center balanceDetail_fd0_0_c0' @tap.stop="handleJumpDiy" data-type="back"
						data-url="1">
						<text class='fu-iconfont2  balanceDetail_fd0_0_c0_c0'>&#xE794;</text>
					</view>
					<view class='flex align-center'>
						<text class='balanceDetail_fd0_0_c1_c0'>消费明细</text>
					</view>
					<view class='flex align-center justify-end balanceDetail_fd0_0_c0'>
					</view>
				</view>
			</view>
			<view :style="{height: (88+StatusBarRpx)+'rpx'}"></view>
			<!---tabs导航flex布局开始-->
			<view class="flex flex-direction flex-wrap align-stretch benben-flex-layout">
				<view>
					<benben-flex-tabs class-name='balanceDetail_benbenTabsfd1_0' v-model="money_type"
						ref="benben_tabsfd1_0" select-mark="benben_tabsfd1_0" key="benben_tabsfd1_0"
						:open-title-type='false' :open-sticky='false' :top='0' :is-show-content='false'
						:scrollspy='false' :tabs-info.sync="tabsInfofd1_0" @change="getBalanceDetailFunc()">

						<scroll-view @scroll="tabsInfofd1_0.scrollX = $event.detail.scrollLeft" id="benben_tabsfd1_0"
							class="benben-tabs" style="width:750rpx" :scroll-x="true"
							:scroll-left.sync="tabsInfofd1_0.moveX" scroll-with-animation="all .3s ease">
							<view class="benben-tabs-content" id="benben_tabsfd1_0-content">
								<view id="benben_tabsfd1_0-title"
									class="benben-tabs-title flex flex align-center justify-around">
									<view
										:class="{ 'checkTitlefd1_0': money_type == '0', 'flex flex-wrap align-center balanceDetail_titlefd1_0_c3': true }"
										@tap="money_type = '0'" :id="`benben_tabsfd1_0-title-item-${'0'}`">

										<text>全部</text>

									</view>
									<view
										:class="{ 'checkTitlefd1_0': money_type == '1', 'flex flex-wrap align-center balanceDetail_titlefd1_0_c3': true }"
										@tap="money_type = '1'" :id="`benben_tabsfd1_0-title-item-${'1'}`">

										<text>收入</text>

									</view>
									<view
										:class="{ 'checkTitlefd1_0': money_type == '2', 'flex flex-wrap align-center balanceDetail_titlefd1_0_c3': true }"
										@tap="money_type = '2'" :id="`benben_tabsfd1_0-title-item-${'2'}`">

										<text>支出</text>

									</view>
								</view>
								<view :style="{ left: tabsInfofd1_0.lineleft, maxWidth: tabsInfofd1_0.lineWidth ,}"
									id="benben_tabsfd1_0-line"
									class="benben-tabs-line flex benben-flex-tabs-line balanceDetail_linefd1_0"></view>
							</view>
						</scroll-view>

					</benben-flex-tabs>

				</view>
				<view class='flex flex-wrap align-center flex-sub balanceDetail_fd1_1'>
					<view class='flex flex-direction flex-wrap align-stretch flex-sub balanceDetail_fd1_1_c0'v-for='(item,key0) in balanceDetail'>
						<template >
							<view class='flex flex-wrap align-center balanceDetail_fd1_1_c0_c0' :key='key0'>
								<view class='flex flex-direction flex-wrap align-start flex-sub'>
									<view class='flex flex-wrap align-center'>
										<text class='balanceDetail_fd1_1_c0_c0_c0_c0_c0'>{{item.type_name}}</text>
									</view>
									<text class='balanceDetail_fd1_1_c0_c0_c0_c1'>{{item.create_time}}</text>
								</view>
								<view class='flex flex-direction flex-wrap align-center'>
									<view class='flex flex-wrap align-center balanceDetail_fd1_1_c0_c0_c1_c0'>
										<text class='balanceDetail_fd1_1_c0_c0_c1_c0_c0' v-if="item.change_type==1">{{item.fadou}}</text>
										<text class='balanceDetail_fd1_1_c0_c0_c1_c0_c1' v-if="item.change_type==2">{{item.fadou}}</text>
									</view>
								</view>
							</view>
						</template>
					</view>
					<fu-empty :pagingListLoadedAll="pagingListLoadedAll"
						:pagingListNoListData="pagingListNoListData" :listDataLength="listDataLength"
						:isLoadInit="isLoadInit"></fu-empty>
				</view>
			</view>

			<!---tabs导航flex布局结束-->
			<benben-popup v-model="popupShow1702027074738" :mask="true" :mask-close-able="true" mode="center">
				<benben-calendar :query="benbenCalendar" :start-time.sync='create_time' :end-time.sync='end_time'
					@change="closePopupFunc()">
				</benben-calendar>
			</benben-popup>


		</view>
	</view>
</template>
<script>
	import pagingList from '@/common/mixin/paging_list.js';
	import {
		validate
	} from '@/common/utils/validate.js'

	export default {
		components: {},
		mixins: [pagingList],

		data() {
			return {
				"popupShow1702027074738": false,
				"benbenCalendar": {
					'width': 686,
					'background': '#ffffff',
					'borderRadius': '16rpx 16rpx 16rpx 16rpx',
					'mode': 'range',
					'future': false,
					'changeTitle': true,
					'changeYear': true,
					'changeMonth': true,
					'yearArrowColor': '#666666',
					'monthArrowColor': '#999999',
					'startText': '开始',
					'endText': '结束',
					'activeBgColor': 'rgba(41,121,255,1)',
					'rangeBgColor': 'rgba(41,121,255,0.13)'
				},
				"tabsInfofd1_0": {
					lineleft: '',
					lineWidth: '',
					moveX: 0,
					scrollX: 0,
					PageScrollX: 0
				},
				"minixPagingListsApi": "",
				"pageingListApiMethod": "",
				"allowOnloadGetList": false,
				"create_time": "",
				"money_type": "0",
				"end_time": "",
				"balanceDetail": []
			};
		},
		computed: {
			themeColor() {
				return this.$store.getters.themeColor
			},

		},
		watch: {},
		onLoad(options) {
			this.getBalanceDetailFunc()
		},
		onUnload() {

		},
		onReady() {

		},
		onShow() {

		},
		onHide() {

		},
		onResize() {

		},
		onPullDownRefresh() {

		},
		onReachBottom(e) {

		},
		onPageScroll(e) {

		},
		methods: {
			//查询余额明细
			getBalanceDetailFunc() {
				this.minixPagingListsApi = global.apiUrls.get_userfadoulog_list;
				this.pageingListApiMethod = 'post';
				this.allowOnloadGetList = false;
				this.pagingListPostDataContent = {
					change_type:this.money_type,
					// create_time: this.create_time,
					// money_type: this.money_type,
					// end_time: this.end_time
				}
				this.listData = [];
				this.balanceDetail = this.listData;
				this.pagingListToggle();

			},
			//关闭日历弹窗
			closePopupFunc() {
				this.getBalanceDetailFunc()
				this.popupShow1702027074738 = false;
			},
			//清除时间
			clearTimeFunc() {
				this.create_time = '';
				this.end_time = '';
				this.getBalanceDetailFunc()
			},
			pagingListPostData() {
				return this.pagingListPostDataContent
			}
		}
	};
</script>
<style lang="scss" scoped>
	.page {
		width: 100vw;
		overflow-x: hidden;
		min-height: calc(100vh - var(--window-bottom));
		background: #F8F8F8;
		background-size: 100% auto;
	}

	.balanceDetail_flex_0 {
		background: #fff;
		width: 750rpx;
		height: 88rpx;
		overflow: hidden;
		z-index: 10;
		top: 0rpx;
		background-size: 100% auto !important;
	}

	.balanceDetail_fd0_0_c1_c0 {
		font-size: 36rpx;
		font-weight: 500;
		color: #333;
	}

	.balanceDetail_fd0_0_c0_c0 {
		font-size: 32rpx;
		font-weight: 500;
		color: #333;
	}

	.balanceDetail_fd0_0_c0 {
		width: 180rpx;
	}

	.balanceDetail_fd0_0 {
		padding: 0rpx 32rpx 0rpx 32rpx;
		line-height: 88rpx;
	}

	.balanceDetail_fd1_1_c0_c0_c1_c0_c1 {
		color: #FD0100;
		font-size: 28rpx;
		font-weight: 400;
	}

	.balanceDetail_fd1_1_c0_c0_c1_c0_c0 {
		color: #01BF85;
		font-size: 28rpx;
		font-weight: 400;
	}

	.balanceDetail_fd1_1_c0_c0_c1_c0 {
		font-size: 30rpx;
		margin: 0rpx 0rpx 8rpx 0rpx;
		color: rgba(51, 51, 51, 1);
		font-weight: 700;
	}

	.balanceDetail_fd1_1_c0_c0_c0_c1 {
		font-size: 24rpx;
		font-weight: 400;
		color: #666666;
		margin: 14rpx 0rpx 0rpx 0rpx;
	}

	.balanceDetail_fd1_1_c0_c0_c0_c0_c0 {
		font-size: 28rpx;
		font-weight: 400;
		color: #333333;
		width: 520rpx;
		-webkit-line-clamp: 1;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-box-orient: vertical;
	}

	.balanceDetail_fd1_1_c0_c0 {
		padding: 28rpx 23rpx 32rpx 0rpx;
	}

	.balanceDetail_fd1_1_c0 {
		border-top: 1px solid rgba(242, 242, 242, 1);
		background: #fff;
		background-size: 100% auto !important;
		padding: 0rpx 0rpx 0rpx 32rpx;
	}

	.balanceDetail_fd1_1 {
		padding: 24rpx 0rpx 24rpx rpx;
	}

	.balanceDetail_bodyfd1_0_c3 {
		padding: 24rpx 0rpx 0rpx 0rpx;
	}

	.balanceDetail_titlefd1_0_c3 {
		font-size: 32rpx;
		font-weight: 400;
		color: rgba(51, 51, 51, 1);
	}

	.balanceDetail_linefd1_0 {
		background: rgba(38, 191, 1, 1);
		width: 50rpx;
		height: 8rpx;
		top: 80rpx;
		background-size: 100% auto !important;
		border-radius: 10rpx 10rpx 10rpx 10rpx;
	}

	.checkTitlefd1_0 {
		font-weight: 500 !important;
		font-size: 32rpx !important;
		color: #26BF01 !important;
		background-color: rgba(255, 255, 255, 1) !important;
	}

	::v-deep .balanceDetail_benbenTabsfd1_0 {
		background: #fff;
		width: 750rpx;
		height: 94rpx;
		white-space: nowrap;
		text-align: center;
	}
</style>